define(function(require, exports){
	var $		= require("jquery");
	var pubjs	= require('pubjs');
	var popwin	= require('@base/dialog').base;

	var Media = popwin.extend({
		init:function(config){
			config = pubjs.conf(config, {
				'title': LANG('媒体资源'),
				'width': 1200,
				'showFoot':0,
				'silence': false,
				'view_model': {
					'isAddMode': false
					,'showSelected': false
					,'showSelect': this.showSelect
				}
			});

			this.$data = {};
			this.Super('init', arguments);
		},
		afterBuild:function(){
			this.Super('afterBuild',arguments);
			var el = this.getDOM('body');
			//el.height(600);
			el.append($([
				'<div pub-name="media" pub-mod="mediaResource/grid/media.base"></div>'
			].join('')));

			var config = {
			};

			this.buildFromTemplate(config);
		},
		afterBuildTemplate: function(){

		},
		reload: function(){
			this.$.media.reload();
			return this;
		}
	});

	exports.base = Media

});